<%= render :partial => 'admin/shared/item_left_bar', :locals => { :on => 8 } %>

<div id="main">
  <div class="box">
    <form class="border p10 th" action="/admin/tags" method="get">
      <label>编号：
        <input type="text" name="id" value="<%= params[:id] %>"/>
      </label>
      &nbsp;&nbsp;
      <label>名称：
        <input type="text" name="name" value="<%= params[:name] %>"/>
      </label>
      &nbsp;&nbsp;
      <input class="submit btt90 bttb" type="submit" value="查询" />
    </form>
  </div>

  <div class="box">
    <% form_for :tag, :url => update_status_admin_tags_path, :html => { :method => :put, :id => 'update_status' } do |f| -%>
    <table width="96%" class="table border">
      <tr>
        <td height="35" colspan="9">
          <%= hidden_field_tag :status -%>
          <a class="btt bttb update_status" rel="0">默认</a>
          <a class="btt bttb update_status" rel="2">推荐</a>
          <a class="btt bttb update_status" rel="-1">删除</a>
        </td>
      </tr>
      <tr>
        <th width="15"><input type="checkbox" id="check_all"></th>
        <th width="38">编号</th>
        <th width="80">名称</th>
        <th width="48">状态</th>
        <th>描述</th>
        <th width="120">创建时间</th>
        <th width="60">操作</th>
      </tr>
      <% for tag in @tags -%>
        <tr class="<%= cycle('', 'tr2') %>">
          <td>
            <input type="checkbox" class="check" name="ids[]" value="<%= tag.id %>">
          </td>
          <td><%= tag.id %></td>
          <td><%= link_to tag, edit_admin_tag_path(tag) %></td>
          <td><%= tag.display_status %></td>
          <td><%= tag.description %></td>
          <td><%= tag.created_at %></td>
          <td><a class="open_window item_recommend" rel="tag" id="<%= tag.id %>" name="<%= tag.name %>">推荐</a></td>
        </tr>
      <% end -%>
    </table>
    <% end -%>
  </div>
  <%= will_paginate @tags -%>
  
  <%= render :partial => 'pop_recommend' -%>
</div>

<%= javascript_include_tag 'admin/base' -%>
